Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 4 - Commands / Command Definitions


Open application command

An Open command is a request to open a file or files.

SYNTAX
open referenceToFile
PARAMETER
referenceToFile
A reference of the form file nameString or alias nameString, or a list of such references (see "Notes").
Class: Reference or list of references
RESULT
None

EXAMPLE
tell app "Scriptable Text Editor"   open file "Macintosh HD:New Products:Mammoth:Product Intro"end tell
tell app "Scriptable Text Editor"   open { file "HD:Letters:Offer", file "HD:Letters:Acceptance"}
end tell
NOTES
To specify the name (nameString) of a file to open, use a string of the form "Disk:Folder1:Folder2:...:Filename"; for details, see "References to Files," which begins on page 144. You can also specify a string with only a filename ("Filename"). In this case, the application attempts to find the file in the
current directory.

If the file or files specified by referenceToFile is already open, it remains open.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996